<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html">
    <body>

        <ui:component>

            <ice:form id="MenuFrom">
                <div class="menuOption">
                    
                    <ice:menuBar id="menuBar" orientation="horizontal">
                        <c:forEach var="option" items="#{MenuCtrl.menu}">

                            <c:if test="#{option.name == option.father.name}">

                                <c:if test="#{option.directLink}">
                                    <ice:menuItem value="#{option.name}" styleClass="mainMenuItem" link="#{facesContext.externalContext.requestContextPath}#{option.link}">
                                        <c:forEach var="suboption" items="#{option.subElement}">
                                            <c:if test="#{suboption.directLink}">
                                                <ice:menuItem value="#{suboption.name}"  icon="/images/www-black.png" link="#{facesContext.externalContext.requestContextPath}#{suboption.link}"/>
                                            </c:if>
                                            <c:if test="#{!suboption.directLink}">
                                                <ice:menuItem value="#{suboption.name}"  icon="/images/www-black.png"/>
                                            </c:if>
                                        </c:forEach>
                                    </ice:menuItem>
                                </c:if>

                                <c:if test="#{!option.directLink}">
                                    <ice:menuItem value="#{option.name}" styleClass="mainMenuItem">
                                        <c:forEach var="suboption" items="#{option.subElement}">
                                            <c:if test="#{suboption.directLink}">
                                                <ice:menuItem value="#{suboption.name}"  icon="/images/www-black.png" link="#{facesContext.externalContext.requestContextPath}#{suboption.link}"/>
                                            </c:if>
                                            <c:if test="#{!suboption.directLink}">
                                                <ice:menuItem value="#{suboption.name}"  icon="/images/www-black.png"/>
                                            </c:if>
                                        </c:forEach>
                                    </ice:menuItem>
                                </c:if>

                            </c:if>

                        </c:forEach>
                    </ice:menuBar>
                </div>
            </ice:form>
        </ui:component>



    </body>
</html>

